powerpc: add --bss-plt to LDFLAGS
authorChris Packham <[email protected]>
Wed, 10 Sep 2014 04:03:10 +0000 (16:03 +1200)
committerYork Sun <[email protected]>
Thu, 25 Sep 2014 16:22:37 +0000 (09:22 -0700)
With some versions of gcc (that we know of 4.6.3 and 4.8.2 are affected)
it is necessary to specify --bss-plt to get the final blrl in the
_GOT2_TABLE_. Without this the last symbol does not get it's address
relocated.  For the P2041RDB board this ended up being
NetArpWaitTimerStart which caused the ARP packets to timeout
immediately.

Signed-off-by: Joakim Tjernlund <[email protected]>
Signed-off-by: Chris Packham <[email protected]>
Acked-by: Joakim Tjernlund <[email protected]>
Acked-by: Scott Wood <[email protected]>
Reviewed-by: York Sun <[email protected]>
arch/powerpc/config.mk

index 6329b6c74f57fccc898affe617dcb507d79c590e..fec02f2b82d727e3bf0f31d50677aea80533d6f9 100644 (file)
@@ -11,6 +11,7 @@ endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
 LDFLAGS_FINAL += --gc-sections
+LDFLAGS_FINAL += --bss-plt
 PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \
                                                                -meabi
 PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2